

<body>

    <div class="hd">
        <div class="warp">
            <ul class="btn-list">
                <li class="item">

                    <a href="<?php echo $base_url?>home/order/shoppingcar" class="shop-car bg">
                        <!--<div class="num">1</div>-->
                        <i class="icon iconfont icon-icon"></i>
                    </a>
                </li>
                <li  class="item">
                     <!--<a href="./register.html">
                        <i class="iconfont icon-wode"></i>请登录
                    </a>-->
                    <?php if(isset($user)){?>
                    <span href="#" class="bg">
                        <i class="icon iconfont icon-wode"></i><?php echo $user->mobile;?>
                    </span>
                    
                    <ul class="child-item">
                            <li><a href="<?php echo $base_url?>home/order/userorders">我的订单</a></li>
                            <li><a href="<?php echo $base_url?>home/address">收货地址</a></li>
                            <li><a href="<?php echo $base_url;?><?php if(!empty($cardid)){echo 'home/card/cardlist';}else{echo 'home/card/addcard';}?>">绑定银行卡</a></li>
                            <li><a href="<?php echo $base_url?>home/account/logout">退出商城</a></li>
                    </ul>
                    <?php }else{?>
                    <a href="<?php echo $base_url?>home/account/login?back_url=<?php echo urlencode('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); ?>">
                        <i class="iconfont icon-wode"></i>请登录
                    </a>
                    <?php }?>
                </li>
            </ul>
            <a href="<?php echo $base_url?>home/goods/index">
            <img src="<?php echo $base_url?>static/dist/images/logo.png" alt="" class="logo-img">
             <span class="span_txt">商城首页</span>
            </a>
        </div>
    </div>
    <div class="all_order" style="display: <?php if(! empty($data)): ?>block<?php else:?>none<?php endif; ?>">
        <div class="warp">
            <div class="tit">
                所有订单
            </div>
            <?php foreach($data as $key => $value): ?>
                <div class="order_item">
                    <div class="order_tit">
                        <p class="r"><span class="time"><?php echo date('Y-m-d H:i:s', $value['create_time']); ?></span> <span class="order_num">订单号：<?php echo $value['orderid']; ?></span> <a href="<?php echo $base_url; ?>home/order/orderinfo?orderid=<?php echo $value['orderid']; ?>" class="order_details_btn">订单详情</a></p>
                        <p class="msg">
                            共<span class="num"><?php echo $value['amount']; ?></span>件
                            <?php if($value['status'] == 3): ?>
                            (<span class="dfk">待付款</span>)
                            <?php elseif($value['status'] == 4): ?>
                            (<span>支付超时</span>)
                            <?php elseif($value['status'] == 2):?>
                            (<span>已发货</span>)   
                            <?php else: ?>
                            (<span>已完成</span>)
                            <?php endif; ?>
                        </p>
                    </div>
                    <div class="order_warp">
                        <div class="l_order_box">
                            <ul>
                                <?php foreach($value['detail'] as $goods_id => $detail): ?>
                                    <li class="order_child_item">

										<div class="l_num">
                                            <p class="num_txt">数量：×<?php echo $detail['amount']; ?></p>
                                        </div>
                                        <div class="l_price">
                                            <p class="price_txt">单价:¥<?php echo $detail['price']; ?></p>
                                        </div>
                                        <div class="l_img">
                                            <img src="<?php echo $detail['urlimg']?>" alt="">
                                        </div>
                                        <div class="l_msg">
                                            <p class="name"><?php echo $detail['goodsname']; ?></p>
                                            <p class="msg"><?php echo $detail['other_name']; ?></p>
                                        </div><!-- 
                                        <div class="l_sku">
                                            <p class="sku_txt">颜色分类：黄色；</p>
                                        </div> -->
										
                                      
                                    </li>
                                <?php endforeach; ?>
                            </ul>
                        </div>
                        <div class="r_order_box">
                            <p class="price_txt">合计： 
                            <span <?php if($value['status'] != 4): ?>class="price"<?php endif; ?>>¥<?php echo $value['price'] ?>
                            </span> 
                            <?php if($value['status'] == 3): ?>
                            <a href="<?php echo $base_url; ?>home/order/orderinfo?orderid=<?php echo $value['orderid']; ?>" class="pay_btn">立即支付</a>
                            <?php endif;?>
                            </p>
                        </div>
                    </div>
                </div>
            <?php endforeach; ?>
        </div>
    </div>
    <div class="no_order" style="display: <?php if(empty($data)): ?>block<?php else:?>none<?php endif; ?>">
        <img src="<?php echo $base_url?>static/dist/images/noneorder2.jpg" alt="">
    </div>
    <div class="pd-200"></div>

    <?php $this->load->view('home/pc/comm'); ?>

    <script src="<?php echo $base_url?>static/dist/js/lib/jquery.min.js"></script>
    <?php $this->load->view('home/pc/footer_js');?>
</body>

</html>
